package kjh820909.basic;

public class J06_Patterns {

	public static void main(String[] args) {
		// 반복문을 이용해서 다양한 패턴 출력하기
		// 패턴1 - 테스트1
		/*System.out.println("1 2 3 4 5 6");
		System.out.println("1 2 3 4 5 6");
		System.out.println("1 2 3 4 5 6");
		System.out.println("1 2 3 4 5 6");
		System.out.println("1 2 3 4 5 6");
		System.out.println("1 2 3 4 5 6");*/
		
		int i = 1;
		int j = 1;
		/*while(i <= 6){
			System.out.print( i + " ");
			++i;
		}
		System.out.println();
		i =1;
		j =1;
		while(j<=6){	
			while(i <= 6){
				System.out.print( i + " ");
				++i;
			}
			
			i = 1;
			System.out.println(" ");
			++j;
		}*/
		i =1;
		j =1;
		while(j<=6){	
			
			while(i <= j){
				System.out.print( i + " ");
				++i;
			}
			
			i = 1;
			System.out.println(" ");
			++j;
		}
		System.out.println("\n");
		
		/*i =1;
		while(i <= 4){
			System.out.print( i + " ");
			++i;
		}*/
		i =1;
		j =6;
		while(j>=1){	
			while(i <= j){
				System.out.print( i + " ");
				++i;
			}
			
			i = 1;
			System.out.println(" ");
			--j;
		}
		System.out.println("\n");
		
	/*	i = 1;
		while(i <= 6){
			if( i!=6)
			System.out.print( " " );
			else
				System.out.print( i );
			++i;
			}
		System.out.println();
		
		i = 6;
		while(i >= 1){
			if( i>4)
			System.out.print( " " );
			else
				System.out.print( i );
			--i;
			}
		System.out.println();*/
		i = 6;
		j = 1;
		while(j<=6){
			while(i >= 1){
				if( i > j)
				System.out.print( "  " );
				else
					System.out.print( i + " ");
				--i;
				}
				++j;
				i=6;
				System.out.println("");
		}
		System.out.println("\n");
		
		j = 1;
		i = 1;
		while(j<=6){
			while( i <= 6 ){
				System.out.print( i + " ");
				++i;
			}
			i = 1;
			++j;
			System.out.println(" ");
		}
	}

}
